package com.appcenter.application.controller;

import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("api/services/jzappcenterservice/syncData")
@Api("同步数据操作API")
public class SyncDataServiceController {

//    @Autowired
//    SyncDataService syncDataService;
//
//    @ApiOperation(value = "中间表添加数据同步记录", notes = "中间表添加数据同步记录",produces = "application/json")
//    @PostMapping("/InsertSyncData")
//    public ResponseEntity<JsonResult> InsertSyncData(@RequestBody InsertSyncDataInput input) throws Exception {
//        //throw new ErrorJsonResult("1000001", "捕获异常信息");
//        JsonResult r = new JsonResult();
//
//        try {
//            r.setResult(syncDataService.InsertSyncData(input));
//        } catch (ErrorJsonResult e) {
//            r.setResult(e.getClass().getName() + ":" + e.getMessage());
//            r.setError(e);
//            e.printStackTrace();
//            return ResponseEntity.status(500).body(r);
//        }
//        return ResponseEntity.ok(r);
//    }
//
//    @ApiOperation(value = "获取同步数据", notes = "获取同步数据",produces = "application/json")
//    @PostMapping("/GetSyncDatas")
//    public ResponseEntity<JsonResult> GetSyncDatas(@RequestBody GetSyncDatasInput input) throws Exception {
//        //throw new ErrorJsonResult("1000001", "捕获异常信息");
//        JsonResult r = new JsonResult();
//
//        try {
//            r.setResult(syncDataService.GetSyncDatas(input));
//        } catch (ErrorJsonResult e) {
//            r.setResult(e.getClass().getName() + ":" + e.getMessage());
//            r.setError(e);
//            e.printStackTrace();
//            return ResponseEntity.status(500).body(r);
//        }
//        return ResponseEntity.ok(r);
//    }
}
